package com.feeyo.prophet.pojo.po;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 对话记录
 */
@Document(collection = "chatRecords")
public class ChatRecord implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @Id
    private String id;

    /**
     * 上条信息的 ID
     */
    private String lastId;

    /**
     * 接入应用 ID
     */
    private String appId;

    /**
     * 对话 ID
     */
    private String conversationId;

    /**
     * 对话内容
     */
    private String content;
    /**
     * 聊天内容类型
     */
    private String contentType;

    /**
     * 使用到的 action
     */
    private String actions;

    /**
     * AI 对话角色类型
     */
    private Integer type;

    /**
     * 对用户是否用, 0:用户未评论. 1:对用户有用. 2:用户无用.
     */
    private Integer usefulness;

    /**
     * 用户反馈
     */
    private String feedback;

    /**
     * 当前文本是否有价值的评分 0~100, 默认 60. 60 代表有用
     */
    private Integer valuableScore;

    /**
     * 是否删除 true:删除, false:未删除. 默认:false
     */
    private Boolean deleted;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    private LocalDateTime updateTime;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLastId() {
        return lastId;
    }

    public void setLastId(String lastId) {
        this.lastId = lastId;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getConversationId() {
        return conversationId;
    }

    public void setConversationId(String conversationId) {
        this.conversationId = conversationId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public String getActions() {
        return actions;
    }

    public void setActions(String actions) {
        this.actions = actions;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getUsefulness() {
        return usefulness;
    }

    public void setUsefulness(Integer usefulness) {
        this.usefulness = usefulness;
    }

    public String getFeedback() {
        return feedback;
    }

    public void setFeedback(String feedback) {
        this.feedback = feedback;
    }

    public Integer getValuableScore() {
        return valuableScore;
    }

    public void setValuableScore(Integer valuableScore) {
        this.valuableScore = valuableScore;
    }

    public Boolean getDeleted() {
        return deleted;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
}